//
//@File    :	6.12_jump.cpp
//@Time    :	2021/08/08 11:24:01
//@Auther  :	Sun Sheng
//@Contact :	970340843@qq.com
//@Desc    :	using contiune and break
//

#include <iostream>
const int ArSize = 80;
int main()
{
    using namespace std;
    char line[ArSize];
    int spaces = 0;

    cout << "Enter a line of text:\n";
    cin.get(line, ArSize);
    cout << "Complete line:\n"
         << line << endl;
    cout << "Line through first period:\n";
    for (int i = 0; line[i] != '\0'; i++)
    {
        cout << line[i];
        if (line[i] == '.')
        {
            break;
        }
        if (line[i] != ' ')
        {
            continue;
        }
        spaces++;
    }
    cout << "\n"
         << spaces << " spaces\n";
    cout << "Done.\n";
    system("pause");
    return 0;
}